﻿#Region "Copyright"
'————————————————————————————————————————
'	创建人员(Creator)    ：Huangyd
'	创建日期(Date)       ：2012-07-14
'   联系方式(Email)      ：aj-ayumi@163.com; gajayumi@gmail.com; ajayumi@me.com
'   描    述(Description)：
'
'	Copyright (C) 2012 ajayumi 版权所有
'————————————————————————————————————————
#End Region
Imports System.ComponentModel
Imports ajayumi.develop.VBasic.Core.Win.WinAPI

Namespace Machine

    ''' <summary>
    ''' ComputerHelper 计算机操作类
    ''' Author  ajayumi
    ''' Date    2009-12-30
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ComputerHelper


        ''' <summary>
        ''' 锁定计算机
        ''' </summary>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared Function LockComputer() As Integer
            Return User32Dll.LockWorkStation()
        End Function

        ''' <summary>
        '''  锁定计算机键盘和鼠标
        ''' </summary>
        ''' <param name="bool">布尔值，锁定为true，否则为false</param>
        ''' <returns></returns>
        Public Shared Function LockKeybroadAndMouse(ByVal bool As Boolean) As Integer
            Return User32Dll.BlockInput(bool)
        End Function
    End Class

End Namespace



